home *** CD-ROM | disk | FTP | other *** search
/ Freelog 22 / freelog 22.iso / Prog / Djgpp / RHIDE14B.ZIP / info / editor.inf next >
Encoding:
INI File  |  1997-10-01  |  56.4 KB  |  1,747 lines

  1. This is Info file editor.inf, produced by Makeinfo version 1.67 from the
  2. input file editor.num.
  3.  
  4. START-INFO-DIR-ENTRY
  5. * SET's Editor: (editor.info). AN EDITOR FOR PROGRAMMERS.
  6. END-INFO-DIR-ENTRY
  7.  
  8. This is the documentation for SET's Editor.
  9.  
  10. Copyright (C) 1996, 1997 Salvador Eduardo Tropea
  11.  
  12. This documentation may be freely distributed, provided this copyright
  13. notice is left intact on all copies.
  14.  
  15. 
  16. File: editor.inf,  Node: Top,  Prev: (dir),  Up: (dir)
  17.  
  18. EDITOR
  19. ******
  20.  
  21. This is the documentation for SET's Editor.
  22.  
  23. Copyright (C) 1996, 1997 Salvador Eduardo Tropea
  24.  
  25. This documentation may be freely distributed, provided this copyright
  26. notice is left intact on all copies.
  27.  
  28. The following master menu lists the major topics in this documentation,
  29. including all the indices.
  30.  
  31. * Menu:
  32.  
  33. * Introduction::
  34. * Available commands::
  35. * Keyboard::
  36. * Editing Modes::
  37. * Calculator::
  38. * How to contact me::
  39. * Index::
  40. * Index of key commands::
  41.  
  42. 
  43. File: editor.inf,  Node: Introduction,  Next: Available commands,  Prev: Top,  Up: Top
  44.  
  45. 1 Introduction
  46. **************
  47.  
  48.    This document describes the use of the SET's editor; this editor was
  49. designed for programmers and to be used alone or inside of the RHIDE.
  50.  
  51.    This documentation may be freely distributed with the editor or the
  52. RHIDE package or any part thereof, provided this copyright notice is left
  53. intact on all copies.
  54.  
  55.    Permission is granted to copy and distribute modified versions of this
  56. manual under the conditions for verbatim copying, provided that the entire
  57. resulting derived work is distributed under the terms of a permission
  58. notice identical to this one.
  59.  
  60.   People who helped me develop the editor:
  61.  
  62.    * ROBERT HöHNE <Robert.Hoehne@Mathematik.TU-Chemnitz.DE>
  63.      (with some base routines, a lot of patches and reports)
  64.  
  65.    * MOLNAR LASZLO <molnarl@cdata.tvnet.hu>
  66.      (with the calculator, tests and a lot of ideas)
  67.  
  68.    * MAREK HABERSACK <grendel@ananke.amu.edu.pl>
  69.      (with tests and a lot of ideas)
  70.  
  71.    * FRANK DONAHOE <fdonahoe@wilkes1.wilkes.edu>
  72.      (with a lot of corrections to this text)
  73.  
  74.   The editor is freeware, but the source-code of this editor is copyrighted
  75. by Salvador Eduardo Tropea.  If you want to include the editor in your
  76. application, using the whole code or only a part contact at first ME
  77. <salvador@inti.edu.ar>
  78.  
  79.   This editor is included in the Robert Höhne's RHIDE as a replacement for
  80. the original TVision's editor class.
  81.  
  82. * Menu:
  83.  
  84. * What is SETs Editor?::
  85. * Requirements::
  86. * About the Author::
  87.  
  88. 
  89. File: editor.inf,  Node: What is SETs Editor?,  Next: Requirements,  Prev: Introduction,  Up: Introduction
  90.  
  91. 1.1 What is SETs Editor?
  92. ========================
  93.  
  94.   SET's editor is an editor designed to be used by programmers; the main
  95. target of the editor is C and C++ code but Pascal and Clipper are supported
  96. too.
  97.  
  98.   The editor was designed to be very similar to the DOS standard editors for
  99. C, especially to Borland's IDE editor. The editor supports a lot of
  100. WordStar style commands plus some CUA commands, so if you have used any
  101. editor that uses these kinds of commands you'll find my editor very
  102. familiar. On the other hand if you have never used a DOS editor,
  103. especially if you use VI on UNIX machines you'll feel lost. You can
  104. configure the keyboard but this feature is relatively limited. *Note How
  105. to configure the keyboard::.
  106.  
  107. 
  108. File: editor.inf,  Node: Requirements,  Next: About the Author,  Prev: What is SETs Editor?,  Up: Introduction
  109.  
  110. 1.2 Requirements
  111. ================
  112.  
  113.   For now I only plan to distribute my editor inside of RHIDE.  Requirements
  114. are the requirements of RHIDE.
  115.  
  116. 
  117. File: editor.inf,  Node: About the Author,  Prev: Requirements,  Up: Introduction
  118.  
  119. 1.3 About the Author
  120. ====================
  121.  
  122. 0B██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
  123. 0F██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
  124. 0B██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
  125.  
  126. The editor was created by Salvador Eduardo Tropea with some code
  127. contributed by Robert Höhne
  128.  
  129.      E-Mail: SALVADOR EDUARDO TROPEA
  130.      <salvador@inti.edu.ar>
  131.      
  132.      Telephone: (+541) 759-0013
  133.      Postal Address:
  134.      Salvador E. Tropea
  135.      Curapaligüe 2124
  136.      (1678) Caseros - 3 de Febrero
  137.      Prov: Buenos Aires
  138.      Argentina
  139.  
  140. 0B██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
  141. 0F██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
  142. 0B██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████
  143.  
  144. 
  145. File: editor.inf,  Node: Available commands,  Next: Keyboard,  Prev: Introduction,  Up: Top
  146.  
  147. 2 Available commands
  148. ********************
  149.  
  150.   In this section I will explain the features of the editor and the default
  151. configuration for the keyboard. If you want to change some assignment of a
  152. key consult "configure the keyboard".  *Note How to configure the
  153. keyboard::.
  154.  
  155.   Read the conventions topic first to understand my way of indicating
  156. keystrokes.
  157.  
  158.   In the description of each command I'll include the internal name used by
  159. the editor because this name is needed to configure the keyboard.
  160.  
  161. * Menu:
  162.  
  163. * Conventions::
  164. * Cursor movement::
  165. * Insert and Delete::
  166. * Blocks::
  167. * Pseudo Macros::
  168. * Miscellaneous::
  169.  
  170. 
  171. File: editor.inf,  Node: Conventions,  Next: Cursor movement,  Prev: Available commands,  Up: Available commands
  172.  
  173. 2.1 Conventions
  174. ===============
  175.  
  176.   I'll use some conventions when talking about the keystrokes needed to
  177. trigger some command. So here is what I use:
  178.  
  179.   The key named <Ctrl> or Control is represented as `^'; this key doesn't
  180. have any effect used alone inside of the editor so the `^' symbol will be
  181. used only in conjunction with the name of some key indicating that you
  182. must press the two keys at the same time. For example, `^A' is <Ctrl> and
  183. <A> at the same time.  When I say "at the same time" that means: press
  184. `<Ctrl>', hold it, and press the other key; that's the reason to put <A>
  185. after <Ctrl>.
  186.  
  187.   To indicate a sequence of keystrokes I'll use a dash to separate the keys.
  188. For example, `^K-B' is <Ctrl> and <K> at the same time, and then press
  189. <B>, of course release `^K' first.
  190.  
  191.   To indicate keys pressed at the same time other than `^x' I'll use a plus.
  192. For example, `Shift+^Insert' is the three keys at the same time!
  193.  
  194.   I don't think that you are stupid; the editor is written for programmers,
  195. but I wanted to make that clear to avoid problems ;-).
  196.  
  197. 
  198. File: editor.inf,  Node: Cursor movement,  Next: Insert and Delete,  Prev: Conventions,  Up: Available commands
  199.  
  200. 2.2 Cursor movement
  201. ===================
  202.  
  203.    * Character left
  204.      - Command: cmbCharLeft
  205.         - Key: Left arrow
  206.         - Alternate: ^S
  207.  
  208.    * Character right
  209.      - Command: cmbCharRight
  210.         - Key: Right arrow
  211.         - Alternate: ^D
  212.  
  213.    * Word left
  214.      - Command: cmbWordLeft
  215.         - Key: ^Left arrow
  216.         - Alternate: ^A
  217.  
  218.    * Word right
  219.      - Command: cmbWordRight
  220.         - Key: ^Right arrow
  221.         - Alternate: ^F
  222.  
  223.    * Line up
  224.      - Command: cmbLineUp
  225.         - Key: Up arrow
  226.         - Alternate: ^E
  227.  
  228.    * Line down
  229.      - Command: cmbLineDown
  230.         - Key: Down arrow
  231.         - Alternate: ^X
  232.  
  233.    * Scroll the screen one line up
  234.      - Command: cmbScrollUp
  235.         - Key: ^W
  236.         - Alternate:
  237.  
  238.    * Scroll the screen one line down
  239.      - Command: cmbScrollDown
  240.         - Key: ^Z
  241.         - Alternate:
  242.  
  243.    * Page up
  244.      - Command: cmbPageUp
  245.         - Key: PgUp
  246.         - Alternate: ^R
  247.  
  248.    * Page down
  249.      - Command: cmbPageDown
  250.         - Key: PgDn
  251.         - Alternate: ^C
  252.  
  253.    * Beginning of line
  254.      - Command: cmbLineStart
  255.         - Key: Home
  256.         - Alternate: ^Q-S
  257.  
  258.    * End of line
  259.      - Command: cmbLineEnd
  260.         - Key: End
  261.         - Alternate: ^Q-D
  262.  
  263.    * Top of window
  264.      - Command: cmbFirstLineInScreen
  265.         - Key: ^Q-E
  266.         - Alternate: ^Home
  267.  
  268.    * Bottom of window
  269.      - Command: cmbLastLineInScreen
  270.         - Key: ^Q-X
  271.         - Alternate: ^End
  272.  
  273.    * Top of file
  274.      - Command: cmbTextStart
  275.         - Key: ^Q-R
  276.         - Alternate: ^PgUp
  277.  
  278.    * Bottom of file
  279.      - Command: cmbTextEnd
  280.         - Key: ^Q-C
  281.         - Alternate: ^PgDn
  282.  
  283. 
  284. File: editor.inf,  Node: Insert and Delete,  Next: Blocks,  Prev: Cursor movement,  Up: Available commands
  285.  
  286. 2.3 Insert and Delete
  287. =====================
  288.  
  289.    * Delete the character under cursor
  290.      - Command: cmbDelChar
  291.         - Key: Del
  292.         - Alternate: ^G
  293.  
  294.    * Delete character to left
  295.      - Command: cmbBackSpace
  296.         - Key: Backspace
  297.         - Alternate: ^H
  298.  
  299.    * Delete line
  300.      - Command: cmbDelLine
  301.         - Key: ^Y
  302.         - Alternate:
  303.  
  304.    * Delete to end of line
  305.      - Command: cmbDelEnd
  306.         - Key: ^Q-Y
  307.         - Alternate: Shift+^Y
  308.  
  309.    * Delete to start of line
  310.      - Command: cmbDelStart
  311.         - Key: ^Q-H
  312.         - Alternate:
  313.  
  314.    * Delete word at left
  315.      - Command: cmbDelWord
  316.         - Key: ^T
  317.         - Alternate:
  318.  
  319.    * Delete word at right
  320.      - Command: cmbDelPrevWord
  321.         - Key: ^Backspace
  322.         - Alternate:
  323.  
  324.    * Insert line
  325.      - Command: cmbNewLine
  326.         - Key: Enter
  327.         - Alternate: ^N
  328.  
  329.    * Insert mode on/off
  330.      - Command: cmbInsMode
  331.         - Key: Ins
  332.         - Alternate: ^V
  333.  
  334.   When you are in insert mode all the typed characters are inserted in the
  335. text, but when the insert mode is off the typed characters replace the old
  336. text. The editor starts with insert mode on. You can quickly know the mode
  337. by the cursor shape. When the insert mode is on, the cursor is only a
  338. line, but when it is off, the cursor is block shaped.
  339.  
  340. 
  341. File: editor.inf,  Node: Blocks,  Next: Pseudo Macros,  Prev: Insert and Delete,  Up: Available commands
  342.  
  343. 2.4 Blocks
  344. ==========
  345.  
  346.   A block is a selected portion of the text. You can copy, delete, etc.
  347. blocks of text. The associated commands are:
  348.  
  349.    * Move to beginning of block
  350.      - Command: cmbGoBeginBlock
  351.         - Key: ^Q-B
  352.         - Alternate:
  353.  
  354.    * Move to end of block
  355.      - Command: cmbGoEndBlock
  356.         - Key: ^Q-K
  357.         - Alternate:
  358.  
  359.    * Set beginning of block
  360.      - Command: cmbStartSelect
  361.         - Key: ^K-B
  362.         - Alternate:
  363.  
  364.    * Set end of block
  365.      - Command: cmbEndSelect
  366.         - Key: ^K-K
  367.         - Alternate:
  368.  
  369.    * Hide/Show block
  370.      - Command: cmbHideSelect
  371.         - Key: ^K-H
  372.         - Alternate:
  373.  
  374.    * Mark line
  375.      - Command: cmbMarkLine
  376.         - Key: ^K-L
  377.         - Alternate:
  378.  
  379.    * Mark word
  380.      - Command: cmbMarkWord
  381.         - Key: ^K-T
  382.         - Alternate:
  383.  
  384.    * Delete block and copy it to the Clipboard
  385.      - Command: cmbCut
  386.         - Key: ^K-Y
  387.         - Alternate: Shift+Del
  388.  
  389.    * Copy the selected block
  390.      - Command: cmbCopyBlock
  391.         - Key: ^K-C
  392.         - Alternate:
  393.  
  394.    * Move block
  395.      - Command: cmbMoveBlock
  396.         - Key: ^K+V
  397.         - Alternate:
  398.  
  399.    * Copy to Clipboard
  400.      - Command: cmbCopy
  401.         - Key: ^Ins
  402.         - Alternate:
  403.  
  404.    * Delete block
  405.      - Command: cmbClear
  406.         - Key: ^Del
  407.         - Alternate:
  408.  
  409.    * Paste from Clipboard
  410.      - Command: cmbPaste
  411.         - Key: Shift+Ins
  412.         - Alternate:
  413.  
  414.    * Read block from disk
  415.      - Command: cmbReadBlock
  416.         - Key: ^K-R
  417.         - Alternate: Shift+^R
  418.  
  419.    * Write block to disk
  420.      - Command: cmbWriteBlock
  421.         - Key: ^K-W
  422.         - Alternate: Shift+^W
  423.  
  424.    * Replace the block by the Clipboard block
  425.      - Command: cmbReplaceSelect
  426.         - Key: Shift+^Ins
  427.         - Alternate:
  428.  
  429.    * Convert to Uppercase
  430.      - Command: cmbToUpper
  431.         - Key: ^K-M
  432.         - Alternate:
  433.  
  434.    * Convert to Lowercase
  435.      - Command: cmbToLower
  436.         - Key: ^K-O
  437.         - Alternate:
  438.  
  439.    * Report the length of the block
  440.      - Command: cmbSelLength
  441.         - Key: ^Q-L
  442.         - Alternate:
  443.  
  444. * Menu:
  445.  
  446. * Block modes::
  447. * Selecting with the mouse or Shift::
  448. * Indentation::
  449. * Rectangular Blocks::
  450.  
  451. 
  452. File: editor.inf,  Node: Block modes,  Next: Selecting with the mouse or Shift,  Prev: Blocks,  Up: Blocks
  453.  
  454. 2.4.1 Block modes
  455. -----------------
  456.  
  457.   There are two block modes. One is the mode that the old editor of RHIDE
  458. used. This mode is used in CUA programs. The other is called Persistent
  459. Blocks.
  460.  
  461.   In the normal mode each time you select a block and then insert anything
  462. in it (with `cmbPaste' or by typing anything) the selected block is deleted
  463. and is replaced by the new text.
  464.  
  465.   In persistent blocks the selection is not replaced and is not lost when
  466. you move the cursor. From this comes the name "Persistent." In this mode
  467. you can use `cmbMoveBlock' and `cmbCopyBlock' without using the Clipboard.
  468. In addition you can apply indentations to the block (*Note Indentation::),
  469. search only inside it, etc. That's what makes this mode much more powerful
  470. than the former. If you really like to replace the selected text by the
  471. selection of the Clipboard, that's the default behaviour of the first
  472. mode. You can use the `cmbReplaceSelect' command to achieve the same in
  473. the Persistent Blocks mode.
  474.  
  475. 
  476. File: editor.inf,  Node: Selecting with the mouse or Shift,  Next: Indentation,  Prev: Block modes,  Up: Blocks
  477.  
  478. 2.4.2 Selecting with the mouse or Shift
  479. ---------------------------------------
  480.  
  481.   The described commands for selecting a block, `cmbStartSelect' and
  482. `cmbEndSelect', are good but not so quick. There are other ways to do this.
  483.  
  484. * Menu:
  485.  
  486. * Using the mouse::
  487. * Using the Shift key::
  488.  
  489. 
  490. File: editor.inf,  Node: Using the mouse,  Next: Using the Shift key,  Prev: Selecting with the mouse or Shift,  Up: Selecting with the mouse or Shift
  491.  
  492. 2.4.2.1 Using the mouse
  493. .......................
  494.  
  495.   Using the mouse you need only point to the start place, hold the left
  496. button pressed and move the mouse to the end point of your block.
  497.  
  498.   To select a word with the mouse just double click on it.
  499.  
  500. 
  501. File: editor.inf,  Node: Using the Shift key,  Prev: Using the mouse,  Up: Selecting with the mouse or Shift
  502.  
  503. 2.4.2.2 Using the Shift key
  504. ...........................
  505.  
  506.   Using the <Shift> key you only need to move the cursor to the start point,
  507. hold `<Shift>' pressed and move the cursor to the end point with any of the
  508. available cursor commands. *Note Cursor movement::.
  509.  
  510. 
  511. File: editor.inf,  Node: Indentation,  Next: Rectangular Blocks,  Prev: Selecting with the mouse or Shift,  Up: Blocks
  512.  
  513. 2.4.3 Indentation
  514. -----------------
  515.  
  516.   You can indent or unindent a block of text using various commands, but you
  517. must keep in mind that for now the editor is limited in the following:
  518. *Note Real Tabs:: If you are using tabs to indent your text, don't mix the
  519. tabs with spaces and, if you are using spaces to indent, don't mix them
  520. with real tabs.
  521.  
  522.    * Indent block one position adding a space
  523.      - Command: cmbIndentBlkOne
  524.         - Key: ^K-I
  525.         - Alternate: Shift+^I
  526.  
  527.    * Unindent block one character - not an x position
  528.      - Command: cmbUnIndentBlkOne
  529.         - Key: ^K-U
  530.         - Alternate: Shift+^U
  531.  
  532.    * Indent block
  533.      - Command: cmbIndentBlk
  534.         - Key: ^K-Tab
  535.         - Alternate:
  536.  
  537.    * Unindent block
  538.      - Command: cmbUnIndentBlk
  539.         - Key: ^K-Shift+Tab
  540.         - Alternate:
  541.  
  542.    * Smart Indent block
  543.      - Command: cmbSmartIndent
  544.         - Key: ^Tab
  545.         - Alternate:
  546.  
  547.    * Smart Unindent block
  548.      - Command: cmbSmartUnIndent
  549.         - Key: Shift+^Tab
  550.         - Alternate:
  551.  
  552. `cmbUnIndentBlkOne' unindents deleting one char at the start of the line so
  553. if the line is indented with tabs the line will retract one tab.
  554.  
  555. `cmbIndentBlk' acts according to the mode. If you are using tabs, the
  556. editor will put one tab beginning each line. If you aren't using tabs the
  557. editor will operate the Tab command on the first line and then will use
  558. this amount of indentation on the entire block. *Note Real Tabs::.
  559.  
  560. `cmbUnIndentBlk' acts according to the mode too. *Note Real Tabs:: mode.
  561. This is just like `cmbUnIndentBlkOne' deleting one tab but if you don't
  562. use tabs the editor uses Backspace on the first used column of the first
  563. line of the block and unindents by the resulting amount all the block.
  564.  
  565. `cmbSmartIndent' and `cmbSmartUnIndent' indents taking as reference the {
  566. } pair where the block is, for example:
  567.        {
  568.      line1
  569.           line2
  570.         line3
  571.        }
  572.  
  573. After indenting a block that contains line1 to line3 is:
  574.        {
  575.         line1
  576.         line2
  577.         line3
  578.        }
  579.  
  580. The indentation is made with spaces.
  581.  
  582. 
  583. File: editor.inf,  Node: Rectangular Blocks,  Prev: Indentation,  Up: Blocks
  584.  
  585. 2.4.4 Rectangular Blocks
  586. ------------------------
  587.  
  588.   The editor includes a mode where you can select a rectangular portion of
  589. the text and copy, cut, clear, paste, move, etc. this region.  This tool
  590. is very useful for modifications on columns.
  591.  
  592.   Attention! The selected area is based on the X,Y coordinates. For this
  593. reason if you insert lines before the bottom of the rectangle the area
  594. won't be moved. I don't plan to move the area by now because that takes
  595. some CPU and I think that this selection is made just before using it. So
  596. don't report that like a bug. That is the way it works!
  597.  
  598.    * Set beginning of block
  599.      - Command: cmbSelRectStart
  600.         - Key: ^K-Shift+B
  601.  
  602.    * Set end of block
  603.      - Command: cmbSelRectEnd
  604.         - Key: ^K-Shift+K
  605.  
  606.    * Hide/Show block
  607.      - Command: cmbSelRectHide
  608.         - Key: ^K-Shift+H
  609.  
  610.    * Delete block and copy it to an special Clipboard
  611.      - Command: cmbSelRectCut
  612.         - Key: ^K-ShiftT
  613.  
  614.    * Move block
  615.      - Command: cmbSelRectMove
  616.         - Key: ^K+Shift+V
  617.  
  618.    * Copy to special Clipboard
  619.      - Command: cmbSelRectCopy
  620.         - Key: ^K-Shift+C
  621.  
  622.    * Delete block
  623.      - Command: cmbSelRectDel
  624.         - Key: ^K-Shift+L
  625.  
  626.    * Paste from special Clipboard
  627.      - Command: cmbSelRectPaste
  628.         - Key: ^K-Shift+P
  629.  
  630. 
  631. File: editor.inf,  Node: Pseudo Macros,  Next: Miscellaneous,  Prev: Blocks,  Up: Available commands
  632.  
  633. 2.5 Pseudo Macros
  634. =================
  635.  
  636.   This feature is very useful to save some keystrokes. With this feature you
  637. can create a lot of shortcuts to make your life easiest.
  638.  
  639. * Menu:
  640.  
  641. * Please enlighten me - what is that?::
  642. * How can I customize that?::
  643.  
  644. 
  645. File: editor.inf,  Node: Please enlighten me - what is that?,  Next: How can I customize that?,  Prev: Pseudo Macros,  Up: Pseudo Macros
  646.  
  647. 2.5.1 Please enlighten me - what is that?
  648. -----------------------------------------
  649.  
  650.   So now, What's a Pseudo Macro? It's like a macro but is triggered by two
  651. things: one the text behind the cursor, and two the `^Space' combination.
  652.  
  653.   And what's the result? The result is customizable, but by default there are
  654. some predefined behaviours. For example, type in a new window the following
  655. two characters: `#i' and the press `^Space' ...
  656.  
  657.   Surprised? I bet! You got: #include <.h> and the cursor just in the right
  658. place to write the name of the header.
  659.  
  660. Now write the famous stdio word, press `<End>', then `<Enter>' twice and
  661. now write the following two letters: `ma' and then `^Space' ...
  662.  
  663.   I bet this time you predicted better what will happen so you aren't so
  664. surprised ;-). Anyways, Surprise! Now type `pr' and the magic keys and ...
  665. `printf("");' appears. To end the happy history now type "Hello world!"
  666. That's all. You wrote the hello world program at a very good speed.
  667.  
  668.   Now you know what I mean when I say pseudo-macros.
  669.  
  670. 
  671. File: editor.inf,  Node: How can I customize that?,  Prev: Please enlighten me - what is that?,  Up: Pseudo Macros
  672.  
  673. 2.5.2 How can I customize that?
  674. -------------------------------
  675.  
  676.   Is very easy. There is a file called `pmacros.txt' in the same directory
  677. where you started the editor. This file contains the definitions for each
  678. pseudo macro. You can define up to 32 pseudo macros. (Please tell me if
  679. that isn't enough. I can sacrifice some time to make it dynamically
  680. expandable).
  681.  
  682.   Important: If you are using RHIDE consult the RHIDE documentation to know
  683. where is stored the `pmacros.txt' file.
  684.  
  685.   The `pmacros.txt' file is a very good example and is self-explained but
  686. I'll include here one example.
  687.  
  688. Trigger: "i("
  689. Mode: 0,1,0,1,0
  690.  "if (@0)\n"
  691.  "  {@1\n"
  692.    "}\n"
  693.  "\belse\n"
  694.  "  {@2\n"
  695.    "}"
  696.  
  697.   The Trigger keyword defines the two letter behind the cursor that will
  698. trigger the pseudo macro.
  699.  
  700.   The Mode keyword indicates the mode that the editor will use when inserting
  701. the text. The modes are:
  702.  
  703.    * Overwrite               *Note Overwrite::
  704.  
  705.    * Autoindent              *Note Autoindent::
  706.  
  707.    * Use Tabs                *Note Real Tabs::
  708.  
  709.    * Persistent blocks       *Note Block modes::
  710.  
  711.    * Intelligent C indent    *Note Intelligent C indent::
  712.  
  713.   Each mode can be 0 or 1. The editor will return to the original mode after
  714. expanding the pseudo macro. In this case the macro is expanded in the No
  715. overwrite, autoindent, don't use tabs, the blocks are persistent and don't
  716. be smart when indenting.
  717.  
  718.   The rest is the code to insert surrounded by ". You can use \b to indicate
  719. backspace, \n for newline and \\ to indicate a simple \. If you want to
  720. insert a @ you have to type it twice @@, because this character has a
  721. special meaning (see below).
  722.  
  723.   After the insertion the cursor is positioned in the place marked with @0.
  724. Don't forget to signal this point or the cursor will positioned at the
  725. beginning of the file. The places marked with @1, @2 and @3 are saved in
  726. the markers 7, 8 and 9.
  727.  
  728. 
  729. File: editor.inf,  Node: Miscellaneous,  Prev: Pseudo Macros,  Up: Available commands
  730.  
  731. 2.6 Miscellaneous
  732. =================
  733.  
  734.    * Autoindent mode on/off
  735.      - Command: cmbIndentMode
  736.         - Key: ^O
  737.  
  738.    * Find place marker
  739.      - Command: cmbGotoMarkn
  740.         - Key: ^Q n*
  741.  
  742.    * Set marker
  743.      - Command: cmbPutMarkn
  744.         - Key: ^K n*
  745.  
  746.    * Search the open curly bracket where the cursor is
  747.      - Command: cmbSearchStart
  748.         - Key: ^[
  749.  
  750.    * Search the close curly bracket where the cursor is
  751.      - Command: cmbSearchEnd
  752.         - Key: ^]
  753.  
  754.    * Search the ( where the cursor is
  755.      - Command: cmbSearchOpPar
  756.         - Key: Shift+^9
  757.  
  758.    * Search the ) where the cursor is
  759.      - Command: cmbSearchClPar
  760.         - Key: Shift+^0
  761.  
  762.    * Search the [ where the cursor is
  763.      - Command: cmbSearchOpCor
  764.         - Key: Shift+^[
  765.  
  766.    * Search the ] where the cursor is
  767.      - Command: cmbSearchClCor
  768.         - Key: Shift+^]
  769.  
  770.    * Undo
  771.      - Command: cmbUndo
  772.         - Key: Alt+Backspace
  773.  
  774.    * PMacro's Trigger
  775.      - Command: cmbExpandCode
  776.         - Key: ^Space
  777.  
  778.    * Goto Line
  779.      - Command: cmbGotoEditorLine
  780.         - Key: ^J
  781.  
  782.    * Set the options of the current window (Not in RHIDE)
  783.      - Command: cmbSetLocalOptions
  784.         - Key: Alt+L
  785.  
  786.    * Set the default options (Not in RHIDE)
  787.      - Command: cmbSetGlobalOptions
  788.         - Key: Alt+G
  789.  
  790.    * Convert all tabs in spaces
  791.      - Command: cmbExpandAllTabs
  792.         - Key: From menu
  793.  
  794.    * Compact the text using tabs
  795.      - Command: cmbCompactBuffer
  796.         - Key: From menu
  797.  
  798.    * Start recording a macro
  799.      - Command: cmbRecordMacro
  800.         - Key: Shift+F10
  801.  
  802.    * Stop recording a macro
  803.      - Command: cmbStopMacro
  804.         - Key: Alt+F10
  805.  
  806.    * Play a macro
  807.      - Command: cmbPlayMacro
  808.         - Key: ^F10
  809.  
  810. 
  811. File: editor.inf,  Node: Keyboard,  Next: Editing Modes,  Prev: Available commands,  Up: Top
  812.  
  813. 3 Keyboard
  814. **********
  815.  
  816.   The editor uses the scancodes of the keys to trigger the different
  817. commands.  You can reconfigure which key triggers some command. In
  818. addition some non-US keyboards can mess the commands so you could need to
  819. configure the editor for your keyboard.
  820.  
  821. * Menu:
  822.  
  823. * How to configure the keyboard::
  824. * A program to find the scancodes::
  825.  
  826. 
  827. File: editor.inf,  Node: How to configure the keyboard,  Next: A program to find the scancodes,  Prev: Keyboard,  Up: Keyboard
  828.  
  829. 3.1 How to configure the keyboard
  830. =================================
  831.  
  832.   There are three associated files with the keyboard: `keybind.cc',
  833. `keybind.h' and `keybind.txt'.
  834.  
  835.   The `keybind.h' file contains the scancode number for each key and the
  836. number for each command. This file is included in `keybind.cc'. If your
  837. keyboard has a different assignment you can modify the scancodes in this
  838. file. For example, the German keyboards have the following sequence QWERTZ
  839. instead of the more common QWERTY, so each time you press `^Z' you won't
  840. get the function of `^Z', but of `^Y' instead. Some can live with it, but
  841. it is fixable.  To fix this problem you must correct the scancode of the Z
  842. key in `keybind.h.' But of course this affects `^Y' too. That's only an
  843. example. The most common problem is with the symbols like {, }, [, etc.
  844. If you don't know how to find the scancode of a key take this link.  *Note
  845. A program to find the scancodes::.
  846.  
  847.   The `keybind.cc' file is a C++ file but you don't need to compile it and
  848. link with the editor, you only need to preprocess it (I used this method to
  849. save the time needed to make a parser ;-).
  850.  
  851.   To convert this file into a `keybind.txt' file use:
  852.  
  853.      cpp keybind.cc > keybind.txt
  854.  
  855. Where cpp is the C++ preprocessor. Any of the comment systems available in
  856. C++ may be used, as cpp does not pass comments to the file, `keybind.txt'.
  857. I guess that you have cpp, but if not you can use another C++ preprocessor
  858. or even Clipper using the /P switch.
  859.  
  860.   There are seven sections in the file, each section is the keyboard
  861. translation under certain situation.
  862. The sections are:
  863.  
  864.    * `NORMAL'
  865.         - Contains: The single key press.
  866.  
  867.    * `SHIFT'
  868.         - Contains: Shift plus a key.
  869.  
  870.    * `CONTROL'
  871.         - Contains: Control plus a key.
  872.  
  873.    * `SHIFT_CONTROL'
  874.         - Contains: Shift plus control plus a key (all at the same time).
  875.  
  876.    * `QUICK'
  877.         - Contains: A key after `^Q' or whatever you defined as `cmbCtrlQ'.
  878.  
  879.    * `BLOCK'
  880.         - Contains: A key after `^K' or whatever you defined as `cmbCtrlK'.
  881.  
  882.    * `BLOCK_SHIFT'
  883.         - Contains: A key plus shift after `^K' or whatever you defined as
  884.      `cmbCtrlK'.
  885.  
  886.    In each section you must put the keyboards and the command associated to
  887. it.
  888.    Use the following syntax:
  889.      Scan_Code = Command
  890.  
  891. Not all the scan codes are available. For example, you can't put:
  892.      RSHIFT = xxxxx
  893.  
  894.    Look at `keybind.h' to see the scan codes labels and the available
  895. commands.
  896.  
  897. Important Notes:
  898. I)
  899.   The new assignments are mixed with the original assignments, so if you
  900. want to eliminate an old key combination you *must* assign a `cmbNoCommand'
  901. to this key. For example, if you wish eliminate the BACKSPACE key and use
  902. the `^O' instead, you must:
  903.   1. put `BACKSPACE = cmbNoCommand' in the NORMAL section,
  904.  
  905.   2. put `O = cmbBackSpace' in the CONTROL section.
  906.  
  907. If you only do part two, you'll not eliminate the BACKSPACE key.
  908.  
  909. II)
  910.   If some thing is wrong in the `keybind.txt' file the program will inform
  911. the error. The line number is for the `keybind.txt' and not for
  912. `keybind.cc' (Sorry, some day I'll fix this).
  913. To continue the execution press any key and then enter.
  914.  
  915. III)
  916.   You can repeat an assignment, the last wins:
  917.  
  918.      BACKSPACE = cmbNoCommand
  919.      BACKSPACE = cmbBackSpace
  920.  
  921.   The first is ignored.
  922.  
  923. 
  924. File: editor.inf,  Node: A program to find the scancodes,  Prev: How to configure the keyboard,  Up: Keyboard
  925.  
  926. 3.2 A program to find the scancodes
  927. ===================================
  928.  
  929.   The author of the following program is Robert Höhne:
  930.  
  931. #include <stdio.h>
  932. #include <dos.h>
  933.  
  934. #ifdef __GNUC__
  935. #include <dpmi.h>
  936. #define REGS __dpmi_regs
  937. #define INTR(nr,r) __dpmi_int(nr,&r)
  938. #else
  939. #define REGS union REGS
  940. #define INTR(nr,r) int86(nr,&r,&r)
  941. #endif
  942.  
  943. unsigned short getshiftstate(void)
  944. {
  945.   REGS r;
  946.   r.h.ah = 0x12;
  947.   INTR(0x16,r);
  948.   return r.x.ax;
  949. }
  950.  
  951. unsigned short gkey(void)
  952. {
  953.   REGS r;
  954.   r.h.ah = 0x10;
  955.   INTR(0x16,r);
  956.   if (r.h.al == 0xE0 || r.h.al == 0) r.h.al = 0;
  957.   return r.x.ax;
  958. }
  959.  
  960. main()
  961. {
  962.   unsigned short key;
  963.   do
  964.   {
  965.     key = gkey();
  966.     fprintf(stdout,"%04X, scan code: %d\n",key,key>>8);
  967.   } while (1);
  968. }
  969.  
  970. 
  971. File: editor.inf,  Node: Editing Modes,  Next: Calculator,  Prev: Keyboard,  Up: Top
  972.  
  973. 4 Editing Modes
  974. ***************
  975.  
  976.   The editor has nine settings that control the function and aspect of the
  977. editor. Not all can be controlled by RHIDE Beta 6 release 22/10, and I
  978. don't know if all the settings will be supported in the 1.0 release so if
  979. you don't find some setting in RHIDE and you feel that setting is really
  980. needed contact me.
  981.  
  982.   The settings are:
  983.  
  984. * Menu:
  985.  
  986. * Overwrite::
  987. * Autoindent::
  988. * Real Tabs::
  989. * Persistent Blocks::
  990. * Intelligent C indent::
  991. * Column cursor::
  992. * Row cursor::
  993. * Match pair highlight::
  994. * Syntax Highlight::
  995.  
  996. 
  997. File: editor.inf,  Node: Overwrite,  Next: Autoindent,  Prev: Editing Modes,  Up: Editing Modes
  998.  
  999. 4.1 Overwrite
  1000. =============
  1001.  
  1002.   This setting controls if the typed characters are inserted in the buffer or
  1003. if the typed characters replace the original ones. *Note Insert and
  1004. Delete:: for a detailed explanation.
  1005.  
  1006. 
  1007. File: editor.inf,  Node: Autoindent,  Next: Real Tabs,  Prev: Overwrite,  Up: Editing Modes
  1008.  
  1009. 4.2 Autoindent
  1010. ==============
  1011.  
  1012.   This setting controls what happend when you press <ENTER>. If this setting
  1013. is off the cursor goes to the column 1 of a new line. If the mode is on
  1014. the editor will try to keep the indentation of the code inserting spaces.
  1015.  
  1016. 
  1017. File: editor.inf,  Node: Real Tabs,  Next: Persistent Blocks,  Prev: Autoindent,  Up: Editing Modes
  1018.  
  1019. 4.3 Real Tabs
  1020. =============
  1021.  
  1022.   This setting controls what happend when you press `<TAB>'. If this setting
  1023. is on the editor will insert an ASCII 9 in this place.
  1024.  
  1025.   An ASCII 9 is a TAB, that means that the width of this char is enough to
  1026. move the cursor to the next tabulator column. In the editor the tabulator
  1027. columns are equidistant and the positions are controled by the Tab Size
  1028. value.
  1029.  
  1030.   If this setting is off the editor won't put any ASCII 9 in your text.
  1031. Instead the editor will insert enough spaces to move the cursor to the
  1032. next tab-stop, but if the cursor is positioned on the first character of
  1033. the line the editor will insert spaces to move this position to the next
  1034. hole in the line over the line where you are. Confused? Sorry for my
  1035. English, an example will clarify that:
  1036.  
  1037. This is a line over the line where you are
  1038.  
  1039. That's the line where the cursor is, at column one.
  1040.  
  1041.   After pressing TAB you'll get:
  1042.  
  1043. This is a line over the line where you are
  1044.  
  1045.      That's the line where the cursor is, at column one.
  1046.  
  1047.   Now can ask, Why this? Is that useful? The answer is that's very useful to
  1048. keep your code indented, experiment using that under a line with if, for,
  1049. etc.
  1050.  
  1051.   Another thing controlled by this setting is the behaviour of the
  1052. <Backspace> key, when the setting is on the key is just 'delete the
  1053. character at the left of the cursor' but when the setting is off this key
  1054. is the 'Unindent' key.
  1055.  
  1056.   The editor is much more coherent when you choose to use TABs or not use
  1057. TABs. If you mix the two modes you'll get some unexpected things, specially
  1058. in the indentation of the blocks.
  1059.  
  1060.   Is better if you always work in a file without tabs and with this setting
  1061. off. Then you'll get much from the editor.
  1062.  
  1063.   Now you can say: `But I really need tabs because I'm editing a make file!'
  1064. or `because I'll send the file using an ultra slow link and I want the
  1065. compression granted by the tabs.' In these cases you can first expand all
  1066. tabs, then work without real tabs and at the finish of your work compact
  1067. all possible spaces and generate a file with all the tabs that you need.
  1068. *Note Miscellaneous:: section.
  1069.  
  1070. 
  1071. File: editor.inf,  Node: Persistent Blocks,  Next: Intelligent C indent,  Prev: Real Tabs,  Up: Editing Modes
  1072.  
  1073. 4.4 Persistent Blocks
  1074. =====================
  1075.  
  1076.   This setting controls the behaviour of the selected area.
  1077.  
  1078.   *Note Block modes:: chapter for a detailed explanation.
  1079.  
  1080. 
  1081. File: editor.inf,  Node: Intelligent C indent,  Next: Column cursor,  Prev: Persistent Blocks,  Up: Editing Modes
  1082.  
  1083. 4.5 Intelligent C indent
  1084. ========================
  1085.  
  1086.   This mode was designed to be used in jointly with the Pseudo Macros (*Note
  1087. Pseudo Macros::) and the Real Tabs mode in off to achieve an easy way to
  1088. indent the code making a better work than the Autoindent mode.
  1089.  
  1090.   In this mode the spaces inserted after pressing <ENTER> depend on the
  1091. first word in the last line. For example, if you have:
  1092.  
  1093.      if (a==b)_
  1094.  
  1095.   With the cursor in the '_' position and press <ENTER> you'll get:
  1096.  
  1097.      if (a==b)
  1098.        _
  1099.  
  1100.   Now you can do either of two things, 1) press space and write the code
  1101. that will be executed by the if, or 2) if this a multiline code press {
  1102. and <ENTER>.  In the last case you'll get:
  1103.  
  1104.      if (a==b)
  1105.        {
  1106.         _
  1107.  
  1108.   Now type your first line of code. Press <ENTER>. Write your next line.
  1109. Press <ENTER> again and then <Backspace>:
  1110.  
  1111.      if (a==b)
  1112.        {
  1113.         1st line;
  1114.         2nd line;
  1115.        _
  1116.  
  1117.   Now type } and press <ENTER> one more time:
  1118.  
  1119.      if (a==b)
  1120.        {
  1121.         1st line;
  1122.         2nd line;
  1123.        }
  1124.      _
  1125.  
  1126.   As you can see the code is perfectly aligned without a significant work on
  1127. your part.
  1128.  
  1129.   I tried to make this mode as smart as possible, but needs more work. If
  1130. you have suggestions contact me.
  1131.  
  1132.   Another important thing is that this indentation has a personal style, my
  1133. style ;-), so maybe you don't like it. If that's your case you can do the
  1134. following things:
  1135.  
  1136.    * Use another way of indentation offered by the editor. For example,
  1137.      turn on the Real Tabs mode and indent with tabs.
  1138.  
  1139.    * Customize the `pmacros.txt' file (*Note Pseudo Macros::), actually
  1140.      this file is coherent with this mode.
  1141.  
  1142.    * The editor isn't configurable like Emacs or Brief using a language,
  1143.      but is written in C++ and chances that you know C++ are over the 90%
  1144.      so contact me and I'll help you to write the routines that you need
  1145.      to get an indentation in your own style :-).
  1146.  
  1147. * Menu:
  1148.  
  1149. * Can you explain to me more about the behavior of this mode?::
  1150. * Do you have more examples?::
  1151.  
  1152. 
  1153. File: editor.inf,  Node: Can you explain to me more about the behavior of this mode?,  Next: Do you have more examples?,  Prev: Intelligent C indent,  Up: Intelligent C indent
  1154.  
  1155. 4.5.1 Can you explain to me more about the behavior of this mode?
  1156. -----------------------------------------------------------------
  1157.  
  1158.   I'll try to describe the behaviour of the mode:
  1159.  
  1160.   Each time you press <ENTER> the editor inserts a `\r\n' string in your
  1161. text, after that the editor searchs one line located above the new line
  1162. that has at least one character inside. This line is taken as reference.
  1163. The editor analyzes this line searching for:
  1164.  
  1165.    * The first non-blank character on this line.
  1166.  
  1167.    * The first word on this line.
  1168.  
  1169.    * The first parenthesis.
  1170.  
  1171.    * The balance of parentheses on the line.
  1172.  
  1173.    * The last non-blank and non-comment character in the line.
  1174.  
  1175.   Now, if the line contains { at the start the editor goes to the first
  1176. column after the {.
  1177.  
  1178.   If the line contains } at the start the editor will go to the same column
  1179. of the } and then will perform a <Backspace>. If the Real Tabs mode is
  1180. off, that's an unindent. *Note Real Tabs::.
  1181.  
  1182.   If the line starts with a C++ comment the effect is the same as in
  1183. Autoindent. *Note Autoindent::.
  1184.  
  1185.   If the line starts with a C comment the editor will try to skip the
  1186. comment and analyze the rest of the line, but if the comment doesn't end
  1187. on this line the editor will go to the column where the `/' is.
  1188.  
  1189.   If the line starts with `/' the editor goes to this column.
  1190.  
  1191.   If the line has more `(' than `)' the editor will go to the column of the
  1192. first non-blank after the first `('.
  1193.  
  1194.   If the line has more `)' than `(' the editor will search the line where the
  1195. number of parentheses is balanced, then will analyze this line. If the
  1196. whole line still generates an unbalanced situation the editor will go to
  1197. the first used column in the line that was found the first time. But if
  1198. this line lets all balanced the editor will take the first word on the
  1199. line and will use it as reference.
  1200.  
  1201.   At last, and according to the word found, the editor will use this word as
  1202. reference. The editor recognises the following keywords:
  1203.  
  1204.    * `do'
  1205.      - Action: +2 but not if ... ;
  1206.  
  1207.    * `if'
  1208.      - Action: +2 but not if ... ;
  1209.  
  1210.    * `for'
  1211.      - Action: +3 but not if ... ;
  1212.  
  1213.    * `else'
  1214.      - Action: +2
  1215.  
  1216.    * `case'
  1217.      - Action: +5
  1218.  
  1219.    * `while'
  1220.      - Action: +2 but not if ... ;
  1221.  
  1222.    * `switch'
  1223.      - Action: +2
  1224.  
  1225.    * `break'
  1226.      - Action: unindent
  1227.  
  1228.    * `return'
  1229.      - Action: unindent
  1230.  
  1231.    * `default'
  1232.      - Action: +5
  1233.  
  1234.   The numbers are how many spaces are added with reference to the first
  1235. letter of the word.  'not if ... ;' specified means that, if the line ends
  1236. with a semicolon, the editor will do the same as for Autoindent. *Note
  1237. Autoindent::. The unindent is performed with <Backspace>.
  1238.  
  1239.   Seasick? *Note Do you have more examples?::.
  1240.  
  1241.   Note: Some of these features were added in v0.2.14 of the editor based on a
  1242. suggestion of <Bradford L. Spencer, stud73@nortel.ca> about the behaviour
  1243. of the mode on a line like this `printf("Num: %d",' with the rest of the
  1244. parameters on the next line.
  1245.  
  1246. 
  1247. File: editor.inf,  Node: Do you have more examples?,  Prev: Can you explain to me more about the behavior of this mode?,  Up: Intelligent C indent
  1248.  
  1249. 4.5.2 Do you have more examples?
  1250. --------------------------------
  1251.  
  1252.   Well here are some examples. I used a strange convention, like this: if I
  1253. say type `a[ENTER]{', type the letter `a', then press `<ENTER>' and
  1254. finally press the `{' key.
  1255.  
  1256. Example 1: (Is similar to one explained before but is to show the
  1257. convention)
  1258.  
  1259.      Type:
  1260.      if (a==1)[ENTER]{[ENTER]a=2;[ENTER]b=3;[ENTER][BACKSPACE]}[ENTER]
  1261.      
  1262.      You'll get:
  1263.      
  1264.      if (a==1)
  1265.        {
  1266.         a=2;
  1267.         b=3;
  1268.        }
  1269.      [<--- cursor here]
  1270.  
  1271. Example 2: A switch/case example
  1272.  
  1273.      Type:
  1274.      switch(a)[ENTER]{[ENTER]case 1:[ENTER]a=2;[ENTER]b=3;[ENTER]break;
  1275.      [ENTER]case 2:[ENTER]b=5;[ENTER]break;[ENTER][BACKSPACE]}[ENTER]
  1276.      
  1277.      You'll get:
  1278.      
  1279.      switch(a)
  1280.        {
  1281.         case 1:
  1282.              a=2;
  1283.              b=3;
  1284.              break;
  1285.         case 2:
  1286.              b=5;
  1287.              break;
  1288.        }
  1289.      [<--- cursor here]
  1290.  
  1291. Example 3: A call to a function that takes a lot of parameters
  1292.  
  1293.      Type:
  1294.      printf([SPACE]"Num: %d",[ENTER]a[SPACE]);[ENTER]
  1295.      
  1296.      You'll get:
  1297.      
  1298.      printf( "Num: %d",
  1299.              a );
  1300.      [<--- cursor here]
  1301.  
  1302. Example 4: A lot of parentheses
  1303.  
  1304.      Type:
  1305.      if[SPACE]([SPACE](a==1)[SPACE]||[ENTER](b==2)[SPACE]||[ENTER]
  1306.      c[SPACE])[ENTER]
  1307.      
  1308.      You'll get:
  1309.      
  1310.      if ( (a==1) ||
  1311.           (b==2) ||
  1312.           c )
  1313.        [<--- cursor here]
  1314.  
  1315. Example 5: Comment trying to interfere part 1
  1316.  
  1317.      Type:
  1318.      /*-a-*/for[SPACE](x=1;x;--x)[ENTER]
  1319.      
  1320.      You'll get:
  1321.      
  1322.      /*-a-*/for (x=1;x;--x)
  1323.                [<--- cursor here]
  1324.  
  1325. Example 6: Comment trying to interfere part 2
  1326.  
  1327.      Type:
  1328.      for[SPACE](x=1;x;--x);[SPACE]//-b[ENTER]
  1329.      
  1330.      You'll get:
  1331.      
  1332.      for (x=1;x;--x); //-b
  1333.      [<--- cursor here]
  1334.  
  1335.  Note: Of course you can fool the editor but as you can see it is relatively
  1336. smart ;-).
  1337.  
  1338. 
  1339. File: editor.inf,  Node: Column cursor,  Next: Row cursor,  Prev: Intelligent C indent,  Up: Editing Modes
  1340.  
  1341. 4.6 Column cursor
  1342. =================
  1343.  
  1344.   This setting enables an strange feature of the editor, when this mode is
  1345. on the column where the cursor is is highlighted. This feature is very good
  1346. to check if some part of your code is aligned.
  1347.  
  1348.   If you like this mode but is very uncomfortable to use all the time
  1349. contact me and if I get enough feedback I'll put this thing in a key to be
  1350. turned on/off quickly.
  1351.  
  1352. 
  1353. File: editor.inf,  Node: Row cursor,  Next: Match pair highlight,  Prev: Column cursor,  Up: Editing Modes
  1354.  
  1355. 4.7 Row cursor
  1356. ==============
  1357.  
  1358.   This setting is similar to the column cursor but acts on the row where the
  1359. cursor is. If you enable the two modes you'll get a cross on the screen
  1360. showing where the cursor is.
  1361.  
  1362. 
  1363. File: editor.inf,  Node: Match pair highlight,  Next: Syntax Highlight,  Prev: Row cursor,  Up: Editing Modes
  1364.  
  1365. 4.8 Match pair highlight
  1366. ========================
  1367.  
  1368.   This mode acts showing the pairs of (/), [/] and {/} on the fly. Each time
  1369. you type one of these symbols the editor will search the matching pair, if
  1370. the editor finds it and the match is on the screen both will be
  1371. highlighted, if the match is outside the screen the editor will inform the
  1372. position on the status line, and if there is no match the editor will
  1373. inform the situation in the status line too.
  1374.  
  1375.   That's very useful when you are typing complex parenthetical expressions or
  1376. a very nested code. You can use it jointly with the `cmbSearchStart',
  1377. `cmbSearchEnd', `cmbSearchOpPar', `cmbSearchClPar', `cmbSearchOpCor' and
  1378. `cmbSearchClCor' commands. (*Note Miscellaneous::).
  1379.  
  1380. 
  1381. File: editor.inf,  Node: Syntax Highlight,  Prev: Match pair highlight,  Up: Editing Modes
  1382.  
  1383. 4.9 Syntax Highlight
  1384. ====================
  1385.  
  1386.   The editor can highlight the syntax of your code. The available modes are:
  1387.  
  1388.    * No highlight, all the code is with the same color.
  1389.  
  1390.    * C/C++ Highlight.
  1391.  
  1392.    * Pascal Highlight.
  1393.  
  1394.    * Clipper Highlight.
  1395.  
  1396.   The kind of highlight is chosen automatically in RHIDE using the extention
  1397. of the file.
  1398.  
  1399.   The C/C++ highlight was designed for the GNU C compiler.
  1400.  
  1401.   The Pascal highlight was designed for the GNU Pascal compiler.
  1402.  
  1403.   The Clipper highlight was designed for the CA-Clipper 5 compiler.
  1404.  
  1405. 
  1406. File: editor.inf,  Node: Calculator,  Next: How to contact me,  Prev: Editing Modes,  Up: Top
  1407.  
  1408. 5 Calculator
  1409. ************
  1410.  
  1411.   The calculator inside the editor was made by Laszlo Molnar. Laszlo is a
  1412. friend of mine from Hungary and is the author of the great DJP progam (a
  1413. djgpp exe's compressor).
  1414.  
  1415.   The sources of the calculator are in the `parser.c' file. They are free
  1416. and you can use it for any purpose.
  1417.  
  1418.   Here is the documentation of the calculator written by Laszlo:
  1419.  
  1420.   The purpose of this program, to provide a simple but powerful 'calculator'
  1421. for programmers, to help with coding and debugging, where GDB's expression
  1422. evaluator is not enough.
  1423.  
  1424.   You may say "Hey, I can write a better one with flex and bison", and you
  1425. may be right. I can make a better one too. But it'll be 4-5 times longer!
  1426. This calculator is only 10 kbytes of C code. What I think? It's not that
  1427. bad.
  1428.  
  1429.   The parser algorithm I use is called 'Operator Precedence Parsing' (I
  1430. translated this from Hungarian, so I may be wrong ;-). It works with
  1431. 'operator precedence grammars' (a subset of LR(1) grammars), which means
  1432. that there can't be two non-terminating tokens next to each other on the
  1433. right side of your grammar rules. It's ideal for expression evaluation.
  1434.  
  1435.   With this parser you can use numbers, operators, parentheses and functions
  1436. like in C.
  1437.  
  1438. Here are the operators in decreasing precedence:
  1439.  
  1440.   1. `~' unary not `-' unary minus
  1441.  
  1442.   2. `**' power
  1443.  
  1444.   3. `*' multiplication `/' division `%' modulo
  1445.  
  1446.   4. `+' plus `-' binary minus
  1447.  
  1448.   5. `<<' shift left `>>' shift right
  1449.  
  1450.   6. `&' logical and
  1451.  
  1452.   7. `^' logical xor
  1453.  
  1454.   8. `|' logical or
  1455.  
  1456.   The calculator includes the following functions: sin\, cos\, tan\, sinh\,
  1457. cosh\, tanh\, asin\, acos\, atan\, log\, log10\, exp\, abs\, sqrt\, ceil
  1458. and floor.  They work as you expected.  Additionally the calculator
  1459. provides some radix conversion routines: bin\, oct\, dec and hex.
  1460.  
  1461.   The calculator uses doubles, but you can use numbers in the usual integer
  1462. formats also: 0x... for base 16, 0b... for base 2 and 0... for base 8.
  1463. The result of the calculation is displayed as a double for base 10, and
  1464. converted to long long format for the other radixes.
  1465.  
  1466. Error codes:
  1467.  
  1468.    * -1
  1469.      - Meaning: yylex()   failed e.g.  `1+#'
  1470.  
  1471.    * -3
  1472.      - Meaning: yyparse() failed e.g.  `1+2)'
  1473.  
  1474.    * -4
  1475.      - Meaning: floating point exception e.g. `sqrt(-1)'
  1476.  
  1477. 
  1478. File: editor.inf,  Node: How to contact me,  Next: Index,  Prev: Calculator,  Up: Top
  1479.  
  1480. 6 How to contact me
  1481. *******************
  1482.  
  1483.   If you have any suggestions or bug report contact me at the address shown
  1484. in the author section. *Note About the Author::.
  1485.  
  1486. * Menu:
  1487.  
  1488. * Bugs::
  1489.  
  1490. 
  1491. File: editor.inf,  Node: Bugs,  Prev: How to contact me,  Up: How to contact me
  1492.  
  1493. 6.1 Bugs
  1494. ========
  1495.  
  1496.   If you find a bug please contact me, the Undo thing is the most complex
  1497. one and I know that needs some work on it.
  1498.  
  1499.   When reporting a bug please don't tell me: Some times some strange thing
  1500. happend ... Try to find a pattern to the problem. What situation triggers
  1501. the problem? ... with which file(s)? Then send me the file and the
  1502. description.
  1503.  
  1504.   When sending to me a file UUEncode it to avoid problems related with the
  1505. e-mail.
  1506.  
  1507. 
  1508. File: editor.inf,  Node: Index,  Next: Index of key commands,  Prev: How to contact me,  Up: Top
  1509.  
  1510. 7 Index
  1511. *******
  1512.  
  1513. * Menu:
  1514.  
  1515. * Autoindent:                            Autoindent.
  1516. * Blocks:                                Blocks.
  1517. * Blocks - Rectangular:                  Rectangular Blocks.
  1518. * Bugs:                                  Bugs.
  1519. * Column cursor:                         Column cursor.
  1520. * How to contact me:                     How to contact me.
  1521. * Indentation:                           Indentation.
  1522. * Insert and Delete:                     Insert and Delete.
  1523. * Intelligent C indent:                  Intelligent C indent.
  1524. * keybind.cc:                            How to configure the keyboard.
  1525. * keybind.h:                             How to configure the keyboard.
  1526. * keybind.txt:                           How to configure the keyboard.
  1527. * Match pair highlight:                  Match pair highlight.
  1528. * Movement:                              Cursor movement.
  1529. * Overwrite:                             Overwrite.
  1530. * Persistent Blocks:                     Block modes.
  1531. * pmacros.txt:                           Pseudo Macros.
  1532. * Pseudo Macros:                         Pseudo Macros.
  1533. * Real Tabs:                             Real Tabs.
  1534. * Row cursor:                            Row cursor.
  1535. * scan codes:                            A program to find the scancodes.
  1536. * TABs:                                  Real Tabs.
  1537. * Use Real Tabs:                         Real Tabs.
  1538.  
  1539. 
  1540. File: editor.inf,  Node: Index of key commands,  Prev: Index,  Up: Top
  1541.  
  1542. 8 Index of key commands
  1543. ***********************
  1544.  
  1545. * Menu:
  1546.  
  1547. * Autoindent mode on/off <^O>:           Miscellaneous.
  1548. * Beginning of line <Home>:              Cursor movement.
  1549. * Bottom of file <^Q-C>:                 Cursor movement.
  1550. * Bottom of window <^Q-X>:               Cursor movement.
  1551. * Character left <Left arrow>:           Cursor movement.
  1552. * Character right <Right arrow>:         Cursor movement.
  1553. * cmbBackSpace <Backspace>:              Insert and Delete.
  1554. * cmbCharLeft <Left arrow>:              Cursor movement.
  1555. * cmbCharRight <Right arrow>:            Cursor movement.
  1556. * cmbClear <^Del>:                       Blocks.
  1557. * cmbCompactBuffer <From menu>:          Miscellaneous.
  1558. * cmbCopy <^Ins>:                        Blocks.
  1559. * cmbCopyBlock <^K-C>:                   Blocks.
  1560. * cmbCut <^K-Y>:                         Blocks.
  1561. * cmbDelChar <Del>:                      Insert and Delete.
  1562. * cmbDelEnd <^Q-Y>:                      Insert and Delete.
  1563. * cmbDelLine <^Y>:                       Insert and Delete.
  1564. * cmbDelPrevWord <^Backspace>:           Insert and Delete.
  1565. * cmbDelStart <^Q-H>:                    Insert and Delete.
  1566. * cmbDelWord <^T>:                       Insert and Delete.
  1567. * cmbEndSelect <^K-K>:                   Blocks.
  1568. * cmbExpandAllTabs <From menu>:          Miscellaneous.
  1569. * cmbExpandCode <^Space>:                Miscellaneous.
  1570. * cmbFirstLineInScreen <^Q-E>:           Cursor movement.
  1571. * cmbGoBeginBlock <^Q-B>:                Blocks.
  1572. * cmbGoEndBlock <^Q-K>:                  Blocks.
  1573. * cmbGotoEditorLine <^J>:                Miscellaneous.
  1574. * cmbGotoMarkn <^Q n*>:                  Miscellaneous.
  1575. * cmbHideSelect <^K-H>:                  Blocks.
  1576. * cmbIndentBlk <^K-Tab>:                 Indentation.
  1577. * cmbIndentBlkOne <^K-I>:                Indentation.
  1578. * cmbIndentMode <^O>:                    Miscellaneous.
  1579. * cmbInsMode <Ins>:                      Insert and Delete.
  1580. * cmbLastLineInScreen <^Q-X>:            Cursor movement.
  1581. * cmbLineDown <Down arrow>:              Cursor movement.
  1582. * cmbLineEnd <End>:                      Cursor movement.
  1583. * cmbLineStart <Home>:                   Cursor movement.
  1584. * cmbLineUp <Up arrow>:                  Cursor movement.
  1585. * cmbMarkLine <^K-L>:                    Blocks.
  1586. * cmbMarkWord <^K-T>:                    Blocks.
  1587. * cmbMoveBlock <^K+V>:                   Blocks.
  1588. * cmbNewLine <Enter>:                    Insert and Delete.
  1589. * cmbPageDown <PgDn>:                    Cursor movement.
  1590. * cmbPageUp <PgUp>:                      Cursor movement.
  1591. * cmbPaste <Shift+Ins>:                  Blocks.
  1592. * cmbPlayMacro <^F10>:                   Miscellaneous.
  1593. * cmbPutMarkn <^K n*>:                   Miscellaneous.
  1594. * cmbReadBlock <^K-R>:                   Blocks.
  1595. * cmbRecordMacro <Shift+F10>:            Miscellaneous.
  1596. * cmbReplaceSelect <Shift+^Ins>:         Blocks.
  1597. * cmbScrollDown <^Z>:                    Cursor movement.
  1598. * cmbScrollUp <^W>:                      Cursor movement.
  1599. * cmbSearchClCor <Shift+^]>:             Miscellaneous.
  1600. * cmbSearchClPar <Shift+^0>:             Miscellaneous.
  1601. * cmbSearchEnd <^]>:                     Miscellaneous.
  1602. * cmbSearchOpCor <Shift+^[>:             Miscellaneous.
  1603. * cmbSearchOpPar <Shift+^9>:             Miscellaneous.
  1604. * cmbSearchStart <^[>:                   Miscellaneous.
  1605. * cmbSelLength <^Q-L>:                   Blocks.
  1606. * cmbSelRectCopy <^K-Shift+C>:           Rectangular Blocks.
  1607. * cmbSelRectCut <^K-ShiftT>:             Rectangular Blocks.
  1608. * cmbSelRectDel <^K-Shift+L>:            Rectangular Blocks.
  1609. * cmbSelRectEnd <^K-Shift+K>:            Rectangular Blocks.
  1610. * cmbSelRectHide <^K-Shift+H>:           Rectangular Blocks.
  1611. * cmbSelRectMove <^K+Shift+V>:           Rectangular Blocks.
  1612. * cmbSelRectPaste <^K-Shift+P>:          Rectangular Blocks.
  1613. * cmbSelRectStart <^K-Shift+B>:          Rectangular Blocks.
  1614. * cmbSetGlobalOptions <Alt+G>:           Miscellaneous.
  1615. * cmbSetLocalOptions <Alt+L>:            Miscellaneous.
  1616. * cmbSmartIndent <^Tab>:                 Indentation.
  1617. * cmbSmartUnIndent <Shift+^Tab>:         Indentation.
  1618. * cmbStartSelect <^K-B>:                 Blocks.
  1619. * cmbStopMacro <Alt+F10>:                Miscellaneous.
  1620. * cmbTextEnd <^Q-C>:                     Cursor movement.
  1621. * cmbTextStart <^Q-R>:                   Cursor movement.
  1622. * cmbToLower <^K-O>:                     Blocks.
  1623. * cmbToUpper <^K-M>:                     Blocks.
  1624. * cmbUndo <Alt+Backspace>:               Miscellaneous.
  1625. * cmbUnIndentBlk <^K-Shift+Tab>:         Indentation.
  1626. * cmbUnIndentBlkOne <^K-U>:              Indentation.
  1627. * cmbWordLeft <^Left arrow>:             Cursor movement.
  1628. * cmbWordRight <^Right arrow>:           Cursor movement.
  1629. * cmbWriteBlock <^K-W>:                  Blocks.
  1630. * Compact the text using tabs <From menu>: Miscellaneous.
  1631. * Convert all tabs in spaces <From menu>: Miscellaneous.
  1632. * Convert to Lowercase <^K-O>:           Blocks.
  1633. * Convert to Uppercase <^K-M>:           Blocks.
  1634. * Copy the selected block <^K-C>:        Blocks.
  1635. * Copy to Clipboard <^Ins>:              Blocks.
  1636. * Copy to special Clipboard <^K-Shift+C>: Rectangular Blocks.
  1637. * Delete block <^Del>:                   Blocks.
  1638. * Delete block <^K-Shift+L>:             Rectangular Blocks.
  1639. * Delete block and copy it to an special Clipboard <^K-ShiftT>: Rectangular Blocks.
  1640. * Delete block and copy it to the Clipboard <^K-Y>: Blocks.
  1641. * Delete character to left <Backspace>:  Insert and Delete.
  1642. * Delete line <^Y>:                      Insert and Delete.
  1643. * Delete the character under cursor <Del>: Insert and Delete.
  1644. * Delete to end of line <^Q-Y>:          Insert and Delete.
  1645. * Delete to start of line <^Q-H>:        Insert and Delete.
  1646. * Delete word at left <^T>:              Insert and Delete.
  1647. * Delete word at right <^Backspace>:     Insert and Delete.
  1648. * End of line <End>:                     Cursor movement.
  1649. * Find place marker <^Q n*>:             Miscellaneous.
  1650. * Goto Line <^J>:                        Miscellaneous.
  1651. * Hide/Show block <^K-H>:                Blocks.
  1652. * Hide/Show block <^K-Shift+H>:          Rectangular Blocks.
  1653. * Indent block <^K-Tab>:                 Indentation.
  1654. * Indent block one position adding a space <^K-I>: Indentation.
  1655. * Insert line <Enter>:                   Insert and Delete.
  1656. * Insert mode on/off <Ins>:              Insert and Delete.
  1657. * Line down <Down arrow>:                Cursor movement.
  1658. * Line up <Up arrow>:                    Cursor movement.
  1659. * Mark line <^K-L>:                      Blocks.
  1660. * Mark word <^K-T>:                      Blocks.
  1661. * Move block <^K+Shift+V>:               Rectangular Blocks.
  1662. * Move block <^K+V>:                     Blocks.
  1663. * Move to beginning of block <^Q-B>:     Blocks.
  1664. * Move to end of block <^Q-K>:           Blocks.
  1665. * Page down <PgDn>:                      Cursor movement.
  1666. * Page up <PgUp>:                        Cursor movement.
  1667. * Paste from Clipboard <Shift+Ins>:      Blocks.
  1668. * Paste from special Clipboard <^K-Shift+P>: Rectangular Blocks.
  1669. * Play a macro <^F10>:                   Miscellaneous.
  1670. * PMacro's Trigger <^Space>:             Miscellaneous.
  1671. * Read block from disk <^K-R>:           Blocks.
  1672. * Replace the block by the Clipboard block <Shift+^Ins>: Blocks.
  1673. * Report the length of the block <^Q-L>: Blocks.
  1674. * Scroll the screen one line down <^Z>:  Cursor movement.
  1675. * Scroll the screen one line up <^W>:    Cursor movement.
  1676. * Search the ( where the cursor is <Shift+^9>: Miscellaneous.
  1677. * Search the ) where the cursor is <Shift+^0>: Miscellaneous.
  1678. * Search the [ where the cursor is <Shift+^[>: Miscellaneous.
  1679. * Search the ] where the cursor is <Shift+^]>: Miscellaneous.
  1680. * Search the close curly bracket where the cursor is <^]>: Miscellaneous.
  1681. * Search the open curly bracket where the cursor is <^[>: Miscellaneous.
  1682. * Set beginning of block <^K-B>:         Blocks.
  1683. * Set beginning of block <^K-Shift+B>:   Rectangular Blocks.
  1684. * Set end of block <^K-K>:               Blocks.
  1685. * Set end of block <^K-Shift+K>:         Rectangular Blocks.
  1686. * Set marker <^K n*>:                    Miscellaneous.
  1687. * Set the default options (Not in RHIDE) <Alt+G>: Miscellaneous.
  1688. * Set the options of the current window (Not in RHIDE) <Alt+L>: Miscellaneous.
  1689. * Smart Indent block <^Tab>:             Indentation.
  1690. * Smart Unindent block <Shift+^Tab>:     Indentation.
  1691. * Start recording a macro <Shift+F10>:   Miscellaneous.
  1692. * Stop recording a macro <Alt+F10>:      Miscellaneous.
  1693. * Top of file <^Q-R>:                    Cursor movement.
  1694. * Top of window <^Q-E>:                  Cursor movement.
  1695. * Undo <Alt+Backspace>:                  Miscellaneous.
  1696. * Unindent block <^K-Shift+Tab>:         Indentation.
  1697. * Unindent block one character - not an x position <^K-U>: Indentation.
  1698. * Word left <^Left arrow>:               Cursor movement.
  1699. * Word right <^Right arrow>:             Cursor movement.
  1700. * Write block to disk <^K-W>:            Blocks.
  1701.  
  1702.  
  1703. 
  1704. Tag Table:
  1705. Node: Top399
  1706. Node: Introduction929
  1707. Node: What is SETs Editor?2484
  1708. Node: Requirements3321
  1709. Node: About the Author3579
  1710. Node: Available commands4852
  1711. Node: Conventions5561
  1712. Node: Cursor movement6739
  1713. Node: Insert and Delete8440
  1714. Node: Blocks9833
  1715. Node: Block modes12063
  1716. Node: Selecting with the mouse or Shift13165
  1717. Node: Using the mouse13561
  1718. Node: Using the Shift key13963
  1719. Node: Indentation14338
  1720. Node: Rectangular Blocks16519
  1721. Node: Pseudo Macros17877
  1722. Node: Please enlighten me - what is that?18233
  1723. Node: How can I customize that?19408
  1724. Node: Miscellaneous21414
  1725. Node: Keyboard23184
  1726. Node: How to configure the keyboard23634
  1727. Node: A program to find the scancodes27067
  1728. Node: Editing Modes27887
  1729. Node: Overwrite28521
  1730. Node: Autoindent28833
  1731. Node: Real Tabs29183
  1732. Node: Persistent Blocks31403
  1733. Node: Intelligent C indent31681
  1734. Node: Can you explain to me more about the behavior of this mode?33821
  1735. Node: Do you have more examples?36954
  1736. Node: Column cursor38950
  1737. Node: Row cursor39465
  1738. Node: Match pair highlight39785
  1739. Node: Syntax Highlight40630
  1740. Node: Calculator41260
  1741. Node: How to contact me43623
  1742. Node: Bugs43898
  1743. Node: Index44432
  1744. Node: Index of key commands45900
  1745. 
  1746. End Tag Table
  1747.